package com.hzdesk.media.matvector.koreabatch.client.my_paperless.logic.view;

import android.app.Activity;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;


import com.hzdesk.media.matvector.koreabatch.client.my_paperless.R;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.adapter.NoScrollViewPagerAdapter;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.base.BaseActivity;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.custom_view.NoScrollViewPager;


import com.hzdesk.media.matvector.koreabatch.client.my_paperless.fragment.Fragment_view.DwonlaodCompleteFragment;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.fragment.Fragment_view.DwonlaodFragment;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.logic.contract.IMainContract;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.logic.persenter.Mainpersenter;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.third.Eyes;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.utils.VirtualButtonsUtils;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MainActivity extends FragmentActivity implements IMainContract.IMainView {

    @BindView(R.id.activity_main_my_viewpager)
    NoScrollViewPager activityMainMyViewpager;
    @BindView(R.id.activity_main_my_tablayout)
    TabLayout activityMainMyTablayout;
    private NoScrollViewPagerAdapter noScrollViewPagerAdapter;
    private List<Fragment> list;




    private Mainpersenter mMainpersenter = new Mainpersenter(this);
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //Eyes.setStatusBarColor(this, 0xff1D8AFF);
        VirtualButtonsUtils.hideNavKey(this);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        list =   mMainpersenter.init(this);

        activityMainMyViewpager.setScroll(true);
        noScrollViewPagerAdapter = new NoScrollViewPagerAdapter(getSupportFragmentManager(),this,list);
        activityMainMyViewpager.setAdapter(noScrollViewPagerAdapter);
        activityMainMyTablayout.setupWithViewPager(activityMainMyViewpager);
        activityMainMyViewpager.setCurrentItem(0,false);
        mMainpersenter.addTabs(noScrollViewPagerAdapter,activityMainMyTablayout);
        mMainpersenter.setListener(activityMainMyViewpager,activityMainMyTablayout);
    }


}
